{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1464
  Verdict: Accepted
}
uses SysUtils, Math;
 
var
	i,j,n,kj,ki:longint;
	a:array[0..60,0..60] of int64;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
fillchar(a,sizeof(a),0);
read(n);
i:=1;
j:=1;
kj:=n;
ki:=n;
if n=1 then write(1) else 
if n=2 then begin
	writeln(11);
	writeln('00');
end else begin
while (ki>0) and (kj>0) and (ki<=n) and (kj<=n) and (abs(ki-i)>1) and (abs(kj-j)>1) do begin
	while j<=kj do begin
		a[i][j]:=1;
		inc(j);
	end;
	dec(j);
	inc(I);
	kj:=n-kj+1;
	while i<=ki do begin
		a[i][j]:=1;
		inc(i);
	end;
	dec(i);
	dec(j);
	ki:=n-ki+3;
	while j>=kj do begin
		a[i][j]:=1;
		dec(j);
	end;
	inc(j);
	dec(i);
	kj:=n-kj-1;
	while i>=ki do begin
		a[i][j]:=1;
		dec(i);
	end;
	inc(i);
	inc(j);
	ki:=n-ki+1;
end;
for i:=1 to n do begin
	for j:=1 to n do
		write(a[i][j]);
	writeln;
end;
end;
end.